import React from "react";
import KfMaterialRapidUpload from "@/components/KfMaterialUpload/KfMaterialRapidUpload";
import KfMaterialAvatarUpload from "@/components/KfMaterialUpload/KfMaterialAvatarUpload";

export type MaterialType = 'IMG' | 'VIDEO' | 'FILE';

interface CompoundedComponent {
    //Kf基础上传组件,下面都是以这个为基础
    //同时这个默认也是文件名列表形式
    Rapid: typeof KfMaterialRapidUpload;

    //单张图片墙的形式
    Avatar: typeof KfMaterialAvatarUpload;
    //图片墙的形式
    PictureWall: typeof KfMaterialRapidUpload;
    //图片列表的形式
    Picture: typeof KfMaterialRapidUpload;
}

const KfUpload: CompoundedComponent = {
    Avatar: KfMaterialAvatarUpload,
    Rapid: KfMaterialRapidUpload,
    PictureWall: props => <KfMaterialRapidUpload {...props} listType={"picture-card"}/>,
    Picture: props => <KfMaterialRapidUpload {...props} listType={"picture"}/>
}
export default KfUpload;
